package com.cjh.feign;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cjh.pojo.User;

import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Component
@FeignClient(value = "USER")
public interface UserFeign {

    @GetMapping("/user/userList")
    PageInfo<User> userList(@RequestParam("page") Integer page, @RequestParam("limit") Integer limit);

    @DeleteMapping("/user/deleteUserById/{id}")
    boolean deleteUserById(@PathVariable("id") Integer id);

    @PostMapping("/user/insertUser")
    boolean insertUser(@RequestBody User user);

    @PutMapping("/user/updateUserById")
    boolean updateUserById(@RequestBody User user);

}

